﻿using ALMDDD.Domain.Core.Events;
using FluentValidation.Results;
using System;
using System.Collections.Generic;
using System.Text;

namespace ALMDDD.Domain.Core.Commands
{
    /// <summary>
    /// 抽象命令类
    /// </summary>
    public  abstract class Command:Message
    {
        /// <summary>
        /// 时间戳
        /// </summary>
        public DateTime TimeStamp { get; private set; }
        /// <summary>
        /// 验证结果
        /// </summary>
        public ValidationResult ValidationResult { get; set; }
        protected Command()
        {
            TimeStamp = DateTime.Now;
        }
        public abstract bool IsValid();
    }
}
 